const fs = require("fs");
fs.mkdirSync("./监狱/吴亦凡",{recursive:true})

let test = fs.openSync("./监狱/吴亦凡/独白.txt","a");

fs.writeFile("./监狱/吴亦凡/独白.txt","如果我有罪，我会自己进监狱",{flag:"w"},err=>{
    console.log(err);   
})
fs.writeFile("./监狱/吴亦凡/独白.txt","我说到做到",{flag:"a"},err=>{
    console.log(err);   
})
fs.mkdirSync("./监狱/大碗宽面",{recursive:true});
fs.rename("./监狱/吴亦凡/独白.txt","./监狱/大碗宽面/说明.txt",err=>{
    if(err==null){
        console.log("改名成功")
    }else{
        console.log(err);
    }
});
// fs.rmdir("./监狱",{recursive:true},err=>{
//     console.log(err)
// })
fs.closeSync(test);

